package com.cloudspace.yunloan.network.api;

import android.os.Build;

import com.cloudspace.yunloan.YunloanApp;
import com.cloudspace.yunloan.network.url.UrlBuilder;
import com.cloudspace.yunloan.utils.AppUtil;
import com.cloudspace.yunloan.utils.Device;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;


public abstract class BaseAPI {
    public static String HOST = "http://test01.cloudscope.cn:7002";
//    public static String HOST = "http://192.168.0.154:8080";
    public final static String PATH = "/yk_api/";
    public static String HOST2 = "http://test02.cloudscope.cn:7002";


    public static final String ACCESS_TOKEN_INVALID = "ACCESS_TOKEN_INVALID";//服务器返回错误代码，表示token过期

    protected String getUrlBuilder(String action) {
        return UrlBuilder.create(HOST, PATH, action);
    }

    protected String getUrl2Builder(String action) {
        return UrlBuilder.create(HOST2, PATH, action);
    }


    abstract protected  String getBaseApiUrl();
}

